package edu.gdut.thesissys.vo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Paper entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "paper", catalog = "gdutmis")
public class Paper extends BaseVo implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4940280448310189182L;
	// Fields

	private Integer paperId;
	private String paperPath;
	private String auditingTag;
	private String openTag;
	private String getTag;
	private String exchangeState;
	private Set<StudentChooseTitle> studentChooseTitles = new HashSet<StudentChooseTitle>(
			0);

	// Constructors

	/** default constructor */
	public Paper() {
	}

	/** full constructor */
	public Paper(String paperPath, String auditingTag, String openTag,
			String getTag, String exchangeState,
			Set<StudentChooseTitle> studentChooseTitles) {
		this.paperPath = paperPath;
		this.auditingTag = auditingTag;
		this.openTag = openTag;
		this.getTag = getTag;
		this.exchangeState = exchangeState;
		this.studentChooseTitles = studentChooseTitles;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "paper_id", unique = true, nullable = false)
	public Integer getPaperId() {
		return this.paperId;
	}

	public void setPaperId(Integer paperId) {
		this.paperId = paperId;
	}

	@Column(name = "paper_path")
	public String getPaperPath() {
		return this.paperPath;
	}

	public void setPaperPath(String paperPath) {
		this.paperPath = paperPath;
	}

	@Column(name = "auditing_tag", length = 1)
	public String getAuditingTag() {
		return this.auditingTag;
	}

	public void setAuditingTag(String auditingTag) {
		this.auditingTag = auditingTag;
	}

	@Column(name = "open_tag", length = 1)
	public String getOpenTag() {
		return this.openTag;
	}

	public void setOpenTag(String openTag) {
		this.openTag = openTag;
	}

	@Column(name = "get_tag", length = 1)
	public String getGetTag() {
		return this.getTag;
	}

	public void setGetTag(String getTag) {
		this.getTag = getTag;
	}

	@Column(name = "exchange_state", length = 1)
	public String getExchangeState() {
		return this.exchangeState;
	}

	public void setExchangeState(String exchangeState) {
		this.exchangeState = exchangeState;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "paper")
	public Set<StudentChooseTitle> getStudentChooseTitles() {
		return this.studentChooseTitles;
	}

	public void setStudentChooseTitles(
			Set<StudentChooseTitle> studentChooseTitles) {
		this.studentChooseTitles = studentChooseTitles;
	}

}